Quantization parameter control for video coding with joined pixel/transform based quantization

ABSTRACT

A device for processing high dynamic range and/or wide color gamut (HDR/WCG) video data can be configured to determine a quantization parameter for quantized transform coefficients of a block of the HDR/WCG video data; inverse quantize the quantized transform coefficients based on the determined quantization parameter to determine dequantized transform coefficients; based on the dequantized transform coefficients, determine a block of residual values for the block of the HDR/WCG video data; based on the block of residual values, determine a reconstructed block for the block of the HDR/WCG video data; determine one or more dynamic range adjustment (DRA) parameters for the block of the HDR/WCG video data; adjust the one or more DRA parameters based on the determined quantization parameter to determine one or more adjusted DRA parameters; and perform DRA on the reconstructed block of the HDR/WCG video data using the one or more adjusted DRA parameters.

This application claims the benefit of U.S. Provisional Application62/607,887 filed 19 Dec. 2017, the entire content of which is hereinincorporated by reference.

TECHNICAL FIELD

This disclosure relates to video encoding and video decoding.

BACKGROUND

Digital video capabilities can be incorporated into a wide range ofdevices, including digital televisions, digital direct broadcastsystems, wireless broadcast systems, personal digital assistants (PDAs),laptop or desktop computers, tablet computers, e-book readers, digitalcameras, digital recording devices, digital media players, video gamingdevices, video game consoles, cellular or satellite radio telephones,so-called “smart phones,” video teleconferencing devices, videostreaming devices, and the like. Digital video devices implement videocompression techniques, such as those described in the standards definedby MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264/MPEG-4, Part 10, AdvancedVideo Coding (AVC), the recently finalized High Efficiency Video Coding(HEVC) standard, and extensions of such standards. The video devices maytransmit, receive, encode, decode, and/or store digital videoinformation more efficiently by implementing such video compressiontechniques.

Video compression techniques perform spatial (intra-picture) predictionand/or temporal (inter-picture) prediction to reduce or removeredundancy inherent in video sequences. For block-based video coding, avideo slice (i.e., a video frame or a portion of a video frame) may bepartitioned into video blocks, which may also be referred to astreeblocks, coding units (CUs) and/or coding nodes. Video blocks in anintra-coded (I) slice of a picture are encoded using spatial predictionwith respect to reference samples in neighboring blocks in the samepicture. Video blocks in an inter-coded (P or B) slice of a picture mayuse spatial prediction with respect to reference samples in neighboringblocks in the same picture or temporal prediction with respect toreference samples in other reference pictures. Pictures may be referredto as frames, and reference pictures may be referred to a referenceframes.

Spatial or temporal prediction results in a predictive block for a blockto be coded. Residual data represents pixel differences between theoriginal block to be coded and the predictive block. An inter-codedblock is encoded according to a motion vector that points to a block ofreference samples forming the predictive block, and the residual dataindicating the difference between the coded block and the predictiveblock. An intra-coded block is encoded according to an intra-coding modeand the residual data. For further compression, the residual data may betransformed from the pixel domain to a transform domain, resulting inresidual transform coefficients, which then may be quantized. Thequantized transform coefficients, initially arranged in atwo-dimensional array, may be scanned in order to produce aone-dimensional vector of transform coefficients, and entropy coding maybe applied to achieve even more compression.

SUMMARY

One or more aspects of this disclosure relate to the field of codingvideo signals, e.g., video data, with High Dynamic Range (HDR) and WideColor Gamut (WCG) representations.

According to one example, a method of processing high dynamic rangeand/or wide color gamut (HDR/WCG) video data includes determining aquantization parameter for quantized transform coefficients of a blockof the HDR/WCG video data; inverse quantizing the quantized transformcoefficients based on the determined quantization parameter to determinedequantized transform coefficients; based on the dequantized transformcoefficients, determining a block of residual values for the block ofthe HDR/WCG video data; based on the block of residual values,determining a reconstructed block for the block of the HDR/WCG videodata; determining one or more dynamic range adjustment (DRA) parametersfor the block of the HDR/WCG video data; adjusting the one or more DRAparameters based on the determined quantization parameter to determineone or more adjusted DRA parameters; and performing DRA on thereconstructed block of the HDR/WCG video data using the one or moreadjusted DRA parameters.

According to another example, a device for processing high dynamic rangeand/or wide color gamut (HDR/WCG) video data includes a memoryconfigured to store video data and one or more processors coupled to thememory and configured to determine a quantization parameter forquantized transform coefficients of a block of the HDR/WCG video data;inverse quantize the quantized transform coefficients based on thedetermined quantization parameter to determine dequantized transformcoefficients; based on the dequantized transform coefficients, determinea block of residual values for the block of the HDR/WCG video data;based on the block of residual values, determine a reconstructed blockfor the block of the HDR/WCG video data; determine one or more dynamicrange adjustment (DRA) parameters for the block of the HDR/WCG videodata; adjust the one or more DRA parameters based on the determinedquantization parameter to determine one or more adjusted DRA parameters;and perform DRA on the reconstructed block of the HDR/WCG video datausing the one or more adjusted DRA parameters.

According to another example, a computer readable medium storesinstructions that when executed by one or more processors cause the oneor more processors to determine a quantization parameter for quantizedtransform coefficients of a block of high dynamic range and/or widecolor gamut (HDR/WCG) video data; inverse quantize the quantizedtransform coefficients based on the determined quantization parameter todetermine dequantized transform coefficients; based on the dequantizedtransform coefficients, determine a block of residual values for theblock of the HDR/WCG video data; based on the block of residual values,determine a reconstructed block for the block of the HDR/WCG video data;determine one or more dynamic range adjustment (DRA) parameters for theblock of the HDR/WCG video data; adjust the one or more DRA parametersbased on the determined quantization parameter to determine one or moreadjusted DRA parameters; and perform DRA on the reconstructed block ofthe HDR/WCG video data using the one or more adjusted DRA parameters.

According to another example, an apparatus for processing high dynamicrange and/or wide color gamut (HDR/WCG) video data includes means fordetermining a quantization parameter for quantized transformcoefficients of a block of the HDR/WCG video data; means for inversequantizing the quantized transform coefficients based on the determinedquantization parameter to determine dequantized transform coefficients;means for determining a block of residual values for the block of theHDR/WCG video data based on the dequantized transform coefficients;means for determining a reconstructed block for the block of the HDR/WCGvideo data based on the block of residual values; means for determiningone or more dynamic range adjustment (DRA) parameters for the block ofthe HDR/WCG video data; means for adjusting the one or more DRAparameters based on the determined quantization parameter to determineone or more adjusted DRA parameters; and means for performing DRA on thereconstructed block of the HDR/WCG video data using the one or moreadjusted DRA parameters.

The details of one or more examples of the disclosure are set forth inthe accompanying drawings and the description below. Other features,objects, and advantages will be apparent from the description, drawings,and claims.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram illustrating an example video encoding anddecoding system that may utilize the techniques described in thisdisclosure.

FIG. 2 is a conceptual drawing illustrating the concepts of HDR data.

FIG. 3 is a conceptual diagram illustrating example color gamuts.

FIG. 4 is a flow diagram illustrating an example of HDR/WCGrepresentation conversion.

FIG. 5 is a flow diagram illustrating an example of HDR/WCG inverseconversion.

FIG. 6 is conceptual diagram illustrating example of Electro-opticaltransfer functions (EOTF) utilized for video data conversion (includingSDR and HDR) from perceptually uniform code levels to linear luminance

FIG. 7 shows an example Visualization of PQ TF (ST2084 EOTF).

FIG. 8 shows an example of an LCS function.

FIG. 9 shows an example of video coding system with DRA.

FIG. 10 is a block diagram illustrating an example video encoder thatmay implement the techniques described in this disclosure.

FIG. 11 is a block diagram illustrating an example video decoder thatmay implement the techniques described in this disclosure.

FIG. 12 is a flowchart illustrating an example operation of a videodecoder for decoding video data in accordance with a technique of thisdisclosure.

DETAILED DESCRIPTION

This disclosure describes techniques related to the field of codingvideo signals with High Dynamic Range (HDR) and Wide Color Gamut (WCG)representations. More specifically, this disclosure describes signalingand operations applied to video data in certain color spaces to enablemore efficient compression of HDR and WCG video data. The techniques ofthis disclosure may improve the compression efficiency of hybrid-basedvideo coding systems utilized for coding HDR & WCG video data.

As will be explained in more detail below, HDR video generally refers tovideo that has a dynamic range that is greater than that of standarddynamic range (SDR) video. WCG generally refers to video that isrepresented with a wider color gamut that may include more vivid color,such as redder reds, greener greens, bluer blues, etc. Both HDR and WCGcan make video appear more realistic. While making video appear morerealistic, HDR and WCG also can increase the complexity associated withencoding and decoding video data. The techniques of this disclosure mayhelp reduce the complexity associated with encoding and decoding HDR andWCG video data and, more specifically, may reduce the complexityassociated with encoding and decoding HDR and WCG video data byharmonizing the quantization performed in the transform domain whenquantizing transform coefficients and the scaling and quantizationperformed in the pixel domain when performing dynamic range adjustment(DRA).

FIG. 1 is a block diagram illustrating an example video encoding anddecoding system 10 that may process HDR/WCG video data and utilize theDRA techniques described in this disclosure. As shown in FIG. 1, system10 includes a source device 12 that provides encoded video data to bedecoded at a later time by a destination device 14. In particular,source device 12 provides the video data to destination device 14 via acomputer-readable medium 16. Source device 12 and destination device 14may comprise any of a wide range of devices, including desktopcomputers, notebook (i.e., laptop) computers, tablet computers, set-topboxes, telephone handsets such as so-called “smart” phones, so-called“smart” pads, televisions, cameras, display devices, digital mediaplayers, video gaming consoles, video streaming devices, or the like. Insome cases, source device 12 and destination device 14 may be equippedfor wireless communication.

Destination device 14 may receive the encoded video data to be decodedvia computer-readable medium 16. Computer-readable medium 16 maycomprise any type of medium or device capable of moving the encodedvideo data from source device 12 to destination device 14. In oneexample, computer-readable medium 16 may comprise a communication mediumto enable source device 12 to transmit encoded video data directly todestination device 14 in real-time. The encoded video data may bemodulated according to a communication standard, such as a wired orwireless communication protocol, and transmitted to destination device14. The communication medium may comprise any wireless or wiredcommunication medium, such as a radio frequency (RF) spectrum or one ormore physical transmission lines. The communication medium may form partof a packet-based network, such as a local area network, a wide-areanetwork, or a global network such as the Internet. The communicationmedium may include routers, switches, base stations, or any otherequipment that may be useful to facilitate communication from sourcedevice 12 to destination device 14.

In other examples, computer-readable medium 16 may includenon-transitory storage media, such as a hard disk, flash drive, compactdisc, digital video disc, Blu-ray disc, or other computer-readablemedia. In some examples, a network server (not shown) may receiveencoded video data from source device 12 and provide the encoded videodata to destination device 14, e.g., via network transmission.Similarly, a computing device of a medium production facility, such as adisc stamping facility, may receive encoded video data from sourcedevice 12 and produce a disc containing the encoded video data.Therefore, computer-readable medium 16 may be understood to include oneor more computer-readable media of various forms, in various examples.

In some examples, encoded data may be output from output interface 22 toa storage device. Similarly, encoded data may be accessed from thestorage device by input interface. The storage device may include any ofa variety of distributed or locally accessed data storage media such asa hard drive, Blu-ray discs, DVDs, CD-ROMs, flash memory, volatile ornon-volatile memory, or any other suitable digital storage media forstoring encoded video data. In a further example, the storage device maycorrespond to a file server or another intermediate storage device thatmay store the encoded video generated by source device 12. Destinationdevice 14 may access stored video data from the storage device viastreaming or download. The file server may be any type of server capableof storing encoded video data and transmitting encoded video data to thedestination device 14. Example file servers include a web server (e.g.,for a website), an FTP server, network attached storage (NAS) devices,or a local disk drive. Destination device 14 may access the encodedvideo data through any standard data connection, including an Internetconnection. This may include a wireless channel (e.g., a Wi-Ficonnection), a wired connection (e.g., DSL, cable modem, etc.), or acombination of both that is suitable for accessing encoded video datastored on a file server. The transmission of encoded video data from thestorage device may be a streaming transmission, a download transmission,or a combination thereof.

The techniques of this disclosure are not necessarily limited towireless applications or settings. The techniques may be applied tovideo coding in support of any of a variety of multimedia applications,such as over-the-air television broadcasts, cable televisiontransmissions, satellite television transmissions, Internet streamingvideo transmissions, such as dynamic adaptive streaming over HTTP(DASH), digital video that is encoded onto a data storage medium,decoding of digital video stored on a data storage medium, or otherapplications. In some examples, system 10 may be configured to supportone-way or two-way video transmission to support applications such asvideo streaming, video playback, video broadcasting, and/or videotelephony.

In the example of FIG. 1, source device 12 includes video source 18,video encoder 20, and output interface 22. Destination device 14includes input interface 28, pre-processing unit 19, video decoder 30,and display device 32. In accordance with this disclosure,pre-processing unit 19 of source device 12 may be configured toimplement the techniques of this disclosure, including signaling andrelated operations applied to video data in certain color spaces toenable more efficient compression of HDR and WCG video data. In someexamples, pre-processing unit 19 may be separate from video encoder 20.In other examples, pre-processing unit 19 may be part of video encoder20. In other examples, a source device and a destination device mayinclude other components or arrangements. For example, source device 12may receive video data from an external video source 18, such as anexternal camera. Likewise, destination device 14 may interface with anexternal display device, rather than including an integrated displaydevice.

The illustrated system 10 of FIG. 1 is merely one example. Techniquesfor processing and coding HDR and WCG video data may be performed by anydigital video encoding and/or video decoding device. Moreover, thetechniques of this disclosure may also be performed by a videopreprocessor and/or video postprocessor. A video preprocessor may be anydevice configured to process video data before encoding (e.g., beforeHEVC or other encoding). A video postprocessor may be any deviceconfigured to process video data after decoding (e.g., after HEVC orother decoding). Source device 12 and destination device 14 are merelyexamples of such coding devices in which source device 12 generatescoded video data for transmission to destination device 14. In someexamples, devices 12, 14 may operate in a substantially symmetricalmanner such that each of devices 12, 14 include video encoding anddecoding components, as well as a video preprocessor and a videopostprocessor (e.g., pre-processing unit and post-processing unit 31,respectively). Hence, system 10 may support one-way or two-way videotransmission between video devices 12, 14, e.g., for video streaming,video playback, video broadcasting, or video telephony.

Video source 18 of source device 12 may include a video capture device,such as a video camera, a video archive containing previously capturedvideo, and/or a video feed interface to receive video from a videocontent provider. As a further alternative, video source 18 may generatecomputer graphics-based data as the source video, or a combination oflive video, archived video, and computer-generated video. In some cases,if video source 18 is a video camera, source device 12 and destinationdevice 14 may form so-called camera phones or video phones. As mentionedabove, however, the techniques described in this disclosure may beapplicable to video coding and video processing, in general, and may beapplied to wireless and/or wired applications. In each case, thecaptured, pre-captured, or computer-generated video may be encoded byvideo encoder 20. The encoded video information may then be output byoutput interface 22 onto a computer-readable medium 16.

Input interface 28 of destination device 14 receives information fromcomputer-readable medium 16. The information of computer-readable medium16 may include syntax information defined by video encoder 20, which isalso used by video decoder 30, that includes syntax elements thatdescribe characteristics and/or processing of blocks and other codedunits, e.g., groups of pictures (GOPs). Display device 32 displays thedecoded video data to a user and may comprise any of a variety ofdisplay devices such as a cathode ray tube (CRT), a liquid crystaldisplay (LCD), a plasma display, an organic light emitting diode (OLED)display, or another type of display device.

Video encoder 20 and video decoder 30 each may be implemented as any ofa variety of suitable encoder or decoder circuitry, such as one or moremicroprocessors, digital signal processors (DSPs), application specificintegrated circuits (ASICs), field programmable gate arrays (FPGAs),discrete logic, software, hardware, firmware or any combinationsthereof. When the techniques are implemented partially in software, adevice may store instructions for the software in a suitable,non-transitory computer-readable medium and execute the instructions inhardware using one or more processors to perform the techniques of thisdisclosure. Each of video encoder 20 and video decoder 30 may beincluded in one or more encoders or decoders, either of which may beintegrated as part of a combined encoder/decoder (CODEC) in a respectivedevice.

Pre-processing unit 19 and post-processing unit 31 each may beimplemented as any of a variety of suitable encoder circuitry, such asone or more microprocessors, DSPs, ASICs, FPGAs, discrete logic,software, hardware, firmware or any combinations thereof. When thetechniques are implemented partially in software, a device may storeinstructions for the software in a suitable, non-transitorycomputer-readable medium and execute the instructions in hardware usingone or more processors to perform the techniques of this disclosure.

Video encoder 20 and video decoder 30 may operate according to a videocompression standard, such as the recently finalized High EfficiencyVideo Coding (HEVC) standard and may conform to the HEVC Test Model(HM). Video encoder 20 and video decoder 30 may additionally operateaccording to an HEVC extension, such as the range extension, themultiview extension (MV-HEVC), or the scalable extension (SHVC) whichhave been developed by the Joint Collaboration Team on Video Coding(JCT-VC) as well as Joint Collaboration Team on 3D Video CodingExtension Development (JCT-3V) of ITU-T Video Coding Experts Group(VCEG) and ISO/IEC Motion Picture Experts Group (MPEG).

Video encoder 20 and video decoder 30 may also operate according toother proprietary or industry standards, such as the ITU-T H.264standard, alternatively referred to as ISO/IEC MPEG-4, Part 10, AdvancedVideo Coding (AVC), or extensions of such standards, such as theScalable Video Coding (SVC) and Multi-view Video Coding (MVC)extensions. The techniques of this disclosure, however, are not limitedto any particular coding standard. Other examples of video compressionstandards include ITU-T H.261, ISO/IEC MPEG-1 Visual, ITU-T H.262 orISO/IEC MPEG-2 Visual, ITU-T H.263, and ISO/IEC MPEG-4 Visual.

ITU-T VCEG (Q6/16) and ISO/IEC MPEG (JTC 1/SC 29/WG 11) are now studyingthe potential need for standardization of future video coding technologywith a compression capability that significantly exceeds that of thecurrent HEVC standard (including its current extensions and near-termextensions for screen content coding and high-dynamic-range coding). Thegroups are working together on this exploration activity in a jointcollaboration effort known as the Joint Video Exploration Team (JVET) toevaluate proposed compression technology designs. The JVET first metduring 19-21 Oct. 2015 and developed several different versions ofreference software, referred to as Joint Exploration Models (JEM). Oneexample of such reference software is referred to as JEM 7 and isdescribed in J. Chen, E. Alshina, G. J. Sullivan, J.-R. Ohm, J. Boyce,“Algorithm Description of Joint Exploration Test Model 7,” JVET-G1001,13-21 Jul. 2017.

Based on the work of ITU-T VCEG (Q6/16) and ISO/IEC MPEG (JTC 1/SC 29/WG11), a new video coding standard, referred to as the Versatile VideoCoding (VVC) standard, is under development by the Joint Video ExpertTeam (JVET) of VCEG and MPEG. An early draft of the VVC is available inthe document JVET-J1001 “Versatile Video Coding (Draft 1)” and itsalgorithm description is available in the document JVET-J1002 “Algorithmdescription for Versatile Video Coding and Test Model 1 (VTM 1).”Another early draft of the VVC is available in the document JVET-L1001“Versatile Video Coding (Draft 3)” and its algorithm description isavailable in the document JVET-L1002 “Algorithm description forVersatile Video Coding and Test Model 3 (VTM 3).”

Techniques of this disclosure may utilize HEVC terminology for ease ofexplanation. It should not be assumed, however, that the techniques ofthis disclosure are limited to HEVC, and in fact, it is explicitlycontemplated that the techniques of this disclosure may be implementedin successor standards to HEVC and its extensions.

In HEVC and other video example coding standards, a video sequence mayinclude a series of pictures. Pictures may also be referred to as“frames.” A picture may include three sample arrays, denoted S_(L),S_(Cb), and S_(Cr). S_(L) is a two-dimensional array (i.e., a block) ofluma samples. S_(Cb) is a two-dimensional array of Cb chrominancesamples. S_(Cr) is a two-dimensional array of Cr chrominance samples.Chrominance samples may also be referred to herein as “chroma” samples.In other instances, a picture may be monochrome and may only include anarray of luma samples.

Video encoder 20 may generate a set of coding tree units (CTUs). Each ofthe CTUs may comprise a coding tree block of luma samples, twocorresponding coding tree blocks of chroma samples, and syntaxstructures used to code the samples of the coding tree blocks. In amonochrome picture or a picture that has three separate color planes, aCTU may comprise a single coding tree block and syntax structures usedto code the samples of the coding tree block. A coding tree block may bean N×N block of samples. A CTU may also be referred to as a “tree block”or a “largest coding unit” (LCU). The CTUs of HEVC may be broadlyanalogous to the macroblocks of other video coding standards, such asH.264/AVC. However, a CTU is not necessarily limited to a particularsize and may include one or more coding units (CUs). A slice may includean integer number of CTUs ordered consecutively in the raster scan.

This disclosure may use the term “video unit” or “video block” to referto one or more blocks of samples and syntax structures used to codesamples of the one or more blocks of samples. Example types of videounits may include CTUs, CUs, PUs, transform units (TUs) in HEVC, ormacroblocks, macroblock partitions, and so on in other video codingstandards.

To generate a coded CTU, video encoder 20 may recursively performquad-tree partitioning on the coding tree blocks of a CTU to divide thecoding tree blocks into coding blocks, hence the name “coding treeunits.” A coding block is an N×N block of samples. A CU may comprise acoding block of luma samples and two corresponding coding blocks ofchroma samples of a picture that has a luma sample array, a Cb samplearray and a Cr sample array, and syntax structures used to code thesamples of the coding blocks. In a monochrome picture or a picture thathas three separate color planes, a CU may comprise a single coding blockand syntax structures used to code the samples of the coding block.

Video encoder 20 may partition a coding block of a CU into one or moreprediction blocks. A prediction block may be a rectangular (i.e., squareor non-square) block of samples on which the same prediction is applied.A prediction unit (PU) of a CU may comprise a prediction block of lumasamples, two corresponding prediction blocks of chroma samples of apicture, and syntax structures used to predict the prediction blocksamples. In a monochrome picture or a picture that have three separatecolor planes, a PU may comprise a single prediction block and syntaxstructures used to predict the prediction block samples. Video encoder20 may generate predictive luma, Cb and Cr blocks for luma, Cb and Crprediction blocks of each PU of the CU.

Video encoder 20 may use intra prediction or inter prediction togenerate the predictive blocks for a PU. If video encoder 20 uses intraprediction to generate the predictive blocks of a PU, video encoder 20may generate the predictive blocks of the PU based on decoded samples ofthe picture associated with the PU.

If video encoder 20 uses inter prediction to generate the predictiveblocks of a PU, video encoder 20 may generate the predictive blocks ofthe PU based on decoded samples of one or more pictures other than thepicture associated with the PU. Inter prediction may be uni-directionalinter prediction (i.e., uni-prediction) or bi-directional interprediction (i.e., bi-prediction). To perform uni-prediction orbi-prediction, video encoder 20 may generate a first reference picturelist (RefPicList0) and a second reference picture list (RefPicList1) fora current slice.

Each of the reference picture lists may include one or more referencepictures. When using uni-prediction, video encoder 20 may search thereference pictures in either or both RefPicList0 and RefPicList1 todetermine a reference location within a reference picture. Furthermore,when using uni-prediction, video encoder 20 may generate, based at leastin part on samples corresponding to the reference location, thepredictive sample blocks for the PU. Moreover, when usinguni-prediction, video encoder 20 may generate a single motion vectorthat indicates a spatial displacement between a prediction block of thePU and the reference location. To indicate the spatial displacementbetween a prediction block of the PU and the reference location, amotion vector may include a horizontal component specifying a horizontaldisplacement between the prediction block of the PU and the referencelocation and may include a vertical component specifying a verticaldisplacement between the prediction block of the PU and the referencelocation.

When using bi-prediction to encode a PU, video encoder 20 may determinea first reference location in a reference picture in RefPicList0 and asecond reference location in a reference picture in RefPicList1. Videoencoder 20 may then generate, based at least in part on samplescorresponding to the first and second reference locations, thepredictive blocks for the PU. Moreover, when using bi-prediction toencode the PU, video encoder 20 may generate a first motion indicating aspatial displacement between a sample block of the PU and the firstreference location and a second motion indicating a spatial displacementbetween the prediction block of the PU and the second referencelocation.

After video encoder 20 generates predictive luma, Cb, and Cr blocks forone or more PUs of a CU, video encoder 20 may generate a luma residualblock for the CU. Each sample in the CU's luma residual block indicatesa difference between a luma sample in one of the CU's predictive lumablocks and a corresponding sample in the CU's original luma codingblock. In addition, video encoder 20 may generate a Cb residual blockfor the CU. Each sample in the CU's Cb residual block may indicate adifference between a Cb sample in one of the CU's predictive Cb blocksand a corresponding sample in the CU's original Cb coding block. Videoencoder 20 may also generate a Cr residual block for the CU. Each samplein the CU's Cr residual block may indicate a difference between a Crsample in one of the CU's predictive Cr blocks and a correspondingsample in the CU's original Cr coding block.

Furthermore, video encoder 20 may use quad-tree partitioning todecompose the luma, Cb and, Cr residual blocks of a CU into one or moreluma, Cb, and Cr transform blocks. A transform block may be arectangular block of samples on which the same transform is applied. Atransform unit (TU) of a CU may comprise a transform block of lumasamples, two corresponding transform blocks of chroma samples, andsyntax structures used to transform the transform block samples. In amonochrome picture or a picture that has three separate color planes, aTU may comprise a single transform block and syntax structures used totransform the transform block samples. Thus, each TU of a CU may beassociated with a luma transform block, a Cb transform block, and a Crtransform block. The luma transform block associated with the TU may bea sub-block of the CU's luma residual block. The Cb transform block maybe a sub-block of the CU's Cb residual block. The Cr transform block maybe a sub-block of the CU's Cr residual block.

Video encoder 20 may apply one or more transforms to a luma transformblock of a TU to generate a luma coefficient block for the TU. Acoefficient block may be a two-dimensional array of transformcoefficients. A transform coefficient may be a scalar quantity. Videoencoder 20 may apply one or more transforms to a Cb transform block of aTU to generate a Cb coefficient block for the TU. Video encoder 20 mayapply one or more transforms to a Cr transform block of a TU to generatea Cr coefficient block for the TU.

In JEM7, rather than using the quadtree partitioning structure of HEVCdescribed above, a quadtree binary tree (QTBT) partitioning structuremay be used. The QTBT structure removes the concepts of multiplepartitions types. That is, the QTBT structure removes the separation ofthe CU, PU, and TU concepts, and supports more flexibility for CUpartition shapes. In the QTBT block structure, a CU can have either asquare or rectangular shape. In one example, a CU is first partition bya quadtree structure. The quadtree leaf nodes are further partitioned bya binary tree structure.

In some examples, there are two splitting types: symmetric horizontalsplitting and symmetric vertical splitting. The binary tree leaf nodesare called CUs, and that segmentation (i.e., the CU) is used forprediction and transform processing without any further partitioning.This means that the CU, PU, and TU have the same block size in the QTBTcoding block structure. In JEM, a CU sometimes consists of coding blocks(CBs) of different color components. For example, one CU contains oneluma CB and two chroma CBs in the case of P and B slices of the 4:2:0chroma format and sometimes consists of a CB of a single component. Forexample, one CU contains only one luma CB or just two chroma CBs in thecase of I slices.

After generating a coefficient block (e.g., a luma coefficient block, aCb coefficient block or a Cr coefficient block), video encoder 20 mayquantize the coefficient block. Quantization generally refers to aprocess in which transform coefficients are quantized to possibly reducethe amount of data used to represent the transform coefficients,providing further compression. Furthermore, video encoder 20 may inversequantize transform coefficients and apply an inverse transform to thetransform coefficients in order to reconstruct transform blocks of TUsof CUs of a picture. Video encoder 20 may use the reconstructedtransform blocks of TUs of a CU and the predictive blocks of PUs of theCU to reconstruct coding blocks of the CU. By reconstructing the codingblocks of each CU of a picture, video encoder 20 may reconstruct thepicture. Video encoder 20 may store reconstructed pictures in a decodedpicture buffer (DPB). Video encoder 20 may use reconstructed pictures inthe DPB for inter prediction and intra prediction.

After video encoder 20 quantizes a coefficient block, video encoder 20may entropy encode syntax elements that indicate the quantized transformcoefficients. For example, video encoder 20 may perform Context-AdaptiveBinary Arithmetic Coding (CABAC) on the syntax elements indicating thequantized transform coefficients. Video encoder 20 may output theentropy-encoded syntax elements in a bitstream.

Video encoder 20 may output a bitstream that includes a sequence of bitsthat forms a representation of coded pictures and associated data. Thebitstream may comprise a sequence of network abstraction layer (NAL)units. Each of the NAL units includes a NAL unit header and encapsulatesa raw byte sequence payload (RBSP). The NAL unit header may include asyntax element that indicates a NAL unit type code. The NAL unit typecode specified by the NAL unit header of a NAL unit indicates the typeof the NAL unit. A RBSP may be a syntax structure containing an integernumber of bytes that is encapsulated within a NAL unit. In someinstances, an RBSP includes zero bits.

Different types of NAL units may encapsulate different types of RBSPs.For example, a first type of NAL unit may encapsulate a RBSP for apicture parameter set (PPS), a second type of NAL unit may encapsulate aRBSP for a coded slice, a third type of NAL unit may encapsulate a RBSPfor Supplemental Enhancement Information (SEI), and so on. A PPS is asyntax structure that may contain syntax elements that apply to zero ormore entire coded pictures. NAL units that encapsulate RBSPs for videocoding data (as opposed to RBSPs for parameter sets and SEI messages)may be referred to as video coding layer (VCL) NAL units. A NAL unitthat encapsulates a coded slice may be referred to herein as a codedslice NAL unit. A RBSP for a coded slice may include a slice header andslice data.

Video decoder 30 may receive a bitstream. In addition, video decoder 30may parse the bitstream to decode syntax elements from the bitstream.Video decoder 30 may reconstruct the pictures of the video data based atleast in part on the syntax elements decoded from the bitstream. Theprocess to reconstruct the video data may be generally reciprocal to theprocess performed by video encoder 20. For instance, video decoder 30may use motion vectors of PUs to determine predictive blocks for the PUsof a current CU. Video decoder 30 may use a motion vector or motionvectors of PUs to generate predictive blocks for the PUs.

In addition, video decoder 30 may inverse quantize coefficient blocksassociated with TUs of the current CU. Video decoder 30 may performinverse transforms on the coefficient blocks to reconstruct transformblocks associated with the TUs of the current CU. Video decoder 30 mayreconstruct the coding blocks of the current CU by adding the samples ofthe predictive sample blocks for PUs of the current CU to correspondingsamples of the transform blocks of the TUs of the current CU. Byreconstructing the coding blocks for each CU of a picture, video decoder30 may reconstruct the picture. Video decoder 30 may store decodedpictures in a decoded picture buffer for output and/or for use indecoding other pictures.

Next generation video applications are anticipated to operate with videodata representing captured scenery with HDR and WCG. Parameters of theutilized dynamic range and color gamut are two independent attributes ofvideo content, and their specification for purposes of digitaltelevision and multimedia services are defined by several internationalstandards. For example, ITU-R Rec. 709 defines parameters for HDTV suchas Standard Dynamic Range and standard color gamut and ITU-R Rec.2020specifies UHDTV parameters such as High Dynamic Range, and wide colorgamut. There are also other SDOs documents specifying these attributesin other systems, e.g. P3 color gamut is defined in SMPTE-231-2 and someparameters of HDR are defined STMPTE-2084. A brief description ofdynamic range and color gamut for video data is provided below.

Video encoder 20 and video decoder 30, in conjunction with othercomponents such as pre-processing unit 19 and post-processing unit 31,respectively, may implement dynamic range coding. Dynamic range istypically defined as the ratio between the minimum and maximumbrightness of the video signal. Dynamic range is also measured in termsof ‘f-stop’, where one f-stop corresponds to a doubling of the signaldynamic range. In MPEG's definition, the High Dynamic Range content issuch content that features brightness variation with more than 16f-stops. In some terms, levels between 10 and 16 f-stops are consideredas intermediate dynamic range but may also be considered as HDR in otherdefinitions. At the same time, the human visual system is capable ofperceiving much larger dynamic range and includes an adaptationmechanism to narrow the so called simultaneous range.

Current video application and services are regulated by Rec.709 andprovide SDR, typically supporting a range of brightness (or luminance)of around 0.1 to 100 candelas (cd) per m2 (often referred to as “nits”),leading to less than 10 f-stops. The next generation video services areexpected to provide dynamic range of up-to 16 f-stops and althoughdetailed specification is currently under development, some initialparameters of have been specified in SMPTE-2084 and Rec.2020.

FIG. 2 shows an example of human vision and display capabilities.Visualization of dynamic range provided by SDR of HDTV, expected HDR ofUHDTV and HVS dynamic range is shown in FIG. 2.

FIG. 3 shows an example of color gamuts. Another aspect for a morerealistic video experience besides HDR is the color dimension, which isconventionally defined by the color gamut. FIG. 3 shows the SDR colorgamut (triangle 100 based on the BT.709 color red, green and blue colorprimaries), and the wider color gamut that for UHDTV (triangle 102 basedon the BT.2020 color red, green and blue color primaries). FIG. 3 alsodepicts the so-called spectrum locus (shape 104), representing limits ofthe natural colors. As illustrated by FIG. 3, moving from BT.709 toBT.2020 color primaries aims to provide UHDTV services with about 70%more colors. D65 specifies the white color for given specifications.

Examples of color gamut specification are shown in Table 1.

TABLE 1 Colorimetry parameters for selected color spaces RGB color spaceparameters Color White point Primary colors space x_(W) y_(W) x_(R)y_(R) x_(G) y_(G) x_(B) y_(B) DCI-P3 0.314 0.351 0.680 0.320 0.265 0.6900.150 0.060 ITU-R 0.3127 0.3290 0.64 0.33 0.30 0.60 0.15 0.06 BT.709ITU-R 0.3127 0.3290 0.708 0.292 0.170 0.797 0.131 0.046 BT.2020

Video encoder 20 and video decoder 30 may perform compression of HDRvideo data. HDR/WCG is typically acquired and stored at a very highprecision per component (even floating point), with the 4:4:4 chromaformat and a very wide color space (e.g., XYZ). This representationtargets high precision and is (almost) mathematically lossless. However,this format feature a lot of redundancies and is not optimal forcompression purposes. A lower precision format with HVS-based assumptionis typically utilized for state-of-the-art video applications.

Typical HDR video data format conversion for purposes of compressionconsists of three major elements, as shown in FIG. 4—(1) non-lineartransfer function (TF) for dynamic range compacting, (2) colorConversion to a more compact or robust color space, and (3)floating-to-integer representation conversion (Quantization).

One example of a video data format conversion process for purposes ofcompression includes three major processes, as shown in FIG. 4. Thetechniques of FIG. 4 may be performed by source device 12. Linear RGBdata 110 may be HDR/WCG video data and may be stored in a floating-pointrepresentation. Linear RGB data 110 may be compacted using a non-lineartransfer function (TF) 112 for dynamic range compacting. Transferfunction 112 may compact linear RGB data 110 using any number ofnon-linear transfer functions, e.g., the PQ TF as defined in SMPTE-2084.In some examples, color conversion process 114 converts the compacteddata into a more compact or robust color space (e.g., a YUV or YCrCbcolor space) that is more suitable for compression by a hybrid videoencoder. This data is then quantized using a floating-to-integerrepresentation quantization unit 116 to produce converted HDR′ data 118.In this example HDR′ data 118 is in an integer representation. The HDR′data is now in a format more suitable for compression by a hybrid videoencoder (e.g., video encoder 20 applying HEVC techniques). The order ofthe processes depicted in FIG. 4 is given as an example and may vary inother applications. For example, color conversion may precede the TFprocess. In addition, additional processing, e.g. spatial subsampling,may be applied to color components.

The inverse conversion at the decoder (e.g., video decoder 30) isdepicted in FIG. 5. The techniques of FIG. 5 may be performed by videodecoder 30 and/or post-processing unit 31 at destination device 14.Converted HDR′ data 120 may be obtained at destination device 14 throughdecoding video data using a hybrid video decoder (e.g., video decoder 30applying HEVC techniques). HDR′ data 120 may then be inverse quantizedby inverse quantization unit 122. Then an inverse color conversionprocess 124 may be applied to the inverse quantized HDR′ data. Theinverse color conversion process 124 may be the inverse of colorconversion process 114. For example, the inverse color conversionprocess 124 may convert the HDR′ data from a YCrCb format back to an RGBformat. Next, inverse transfer function 126 may be applied to the datato add back the dynamic range that was compacted by transfer function112 to recreate the linear RGB data 128.

The high dynamic range of input RGB data in linear and floating pointrepresentation is compacted with the utilized non-linear transferfunction TF, e.g., PQ TF as defined in SMPTE-2084, following which it isconverted to a target color space more suitable for compression, e.g.YCbCr, and then quantized to achieve integer representation. The orderof these elements is given as an example, and may vary in real-worldapplications, e.g. color conversion may precede the TF module, as wellas additional processing, e.g. spatial subsampling may be applied tocolor components. These three components are described in more detail.

Video encoder 20 and video decoder 30 may utilize transfer functions(TFs). A TF is applied to the data to compact the dynamic range of thedata and make it possible to represent the data with limited number ofbits. This function is typically a one-dimensional (1D) non-linearfunction either reflecting inverse of electro-optical transfer function(EOTF) of the end-user display as specified for SDR in Rec.709 orapproximating the HVS perception to brightness changes as for PQ TFspecified in SMPTE-2084 for HDR. The inverse process of the OETF is theEOTF (electro-optical transfer function), which maps the code levelsback to luminance. FIG. 6 shows several examples of TFs.

Specification of ST2084 defined the EOTF application as following. TF isapplied to a normalized linear R, G, B values which results in nonlinearrepresentation of R′G′B′. ST2084 defines normalization by NORM=10000,which is associated with a peak brightness of 10000 nits (cd/m2).

$\begin{matrix}{{R^{\prime} = {{PQ\_ TF}\left( {\max\left( {0,{\min\left( {{R/{NORM}},1} \right)}} \right)} \right)}}{G^{\prime} = {{PQ\_ TF}\left( {\max\left( {0,{\min\left( {{G/{NORM}},1} \right)}} \right)} \right)}}{B^{\prime} = {{PQ\_ TF}\left( {\max\left( {0,{\min\left( {{B/{NORM}},1} \right)}} \right)} \right)}}{with}{{{PQ\_ TF}(L)} = \left( \frac{c_{1} + {c_{2}L^{m_{1}}}}{1 + {c_{3}L^{m_{1}}}} \right)^{m_{2}}}{m_{1} = {{\frac{2610}{4096} \times \frac{1}{4}} = 0.1593017578125}}{m_{2} = {{\frac{2523}{4096} \times 128} = 78.84375}}{c_{1} = {{c_{3} - c_{2} + 1} = {\frac{3424}{4096} = 0.8359375}}}{c_{2} = {{\frac{2413}{4096} \times 32} = 18.8515625}}{c_{3} = {{\frac{2392}{4096} \times 32} = 18.6875}}} & (1)\end{matrix}$

FIG. 7 shows an example Visualization of PQ TF (ST2084 EOTF). With inputvalues (linear color value) normalized to range 0 . . . 1 and normalizedoutput values (nonlinear color value) PQ EOTF is visualized in FIG. 7.As can be seen from the curve, 1 percent (low illumination) of dynamicalrange of the input signal is converted to 50% of dynamical range ofoutput signal.

Typically, EOTF is defined as a function with a floating point accuracy,thus no error is introduced to a signal with this non-linearity ifinverse TF so called OETF is applied. Inverse TF (OETF) specified inST2084 is defined as inversePQ function:

$\begin{matrix}{{R = {10000*{inversePQ\_ TF}\left( R^{\prime} \right)}}{G = {10000*{inversePQ\_ TF}\left( G^{\prime} \right)}}{B = {10000*{inversePQ\_ TF}\left( B^{\prime} \right)}}{{{with}\mspace{14mu}{inversePQ\_ TF}(N)} = \left( \frac{\max\left\lbrack {\left( {N^{1/m_{2}} - c_{1}} \right),0} \right\rbrack}{c_{2} - {c_{3}N^{1/m_{2}}}} \right)^{1/m_{1}}}{m_{1} = {{\frac{2610}{4096} \times \frac{1}{4}} = {{0.1593017578125m_{2}} = {{\frac{2523}{4096} \times 128} = {{78.84375c_{1}} = {{c_{3} - c_{2} + 1} = {\frac{3424}{4096} = {{0.8359375c_{2}} = {{\frac{2413}{4096} \times 32} = {{18.8515625c_{3}} = {{\frac{2392}{4096} \times 32} = 18.6875}}}}}}}}}}}} & (2)\end{matrix}$

With floating point accuracy, sequential application of EOTF and OETFprovides a perfect reconstruction without errors. However, thisrepresentation is not optimal for streaming or broadcasting services.More compact representation with fixed bits accuracy of nonlinear R′G′B′data is described in following sections. Note, that EOTF and OETF is asubject of very active research currently, and TF utilized in some HDRvideo coding systems may be different from ST2084.

Video encoder 20 and video decoder 30 may be configured to implementcolor transforms. RGB data is typically utilized as an input, becauseRGB data is produced by image capturing sensors. However, this colorspace has high redundancy among components and is not optimal forcompact representation. To achieve more compact and more robustrepresentation, RGB components are typically converted to a moreuncorrelated color space more suitable for compression, e.g. YCbCr. Thiscolor space separates the brightness in the form of luminance and colorinformation in different un-correlated components.

For modern video coding systems, typically used colour space is YCbCr,as specified in ITU-R BT.709 or ITU-R BT.709. The YCbCr colour space inBT.709 standard specifies the following conversion process from R′G′B′to Y′CbCr (non-constant luminance representation):

$\begin{matrix}{{Y^{\prime} = {{0.2126*R^{\prime}} + {0.7152*G^{\prime}} + {0.0722*B^{\prime}}}}{{Cb} = \frac{B^{\prime} - Y^{\prime}}{1.8556}}{{Cr} = \frac{R^{\prime} - Y^{\prime}}{1.5748}}} & (3)\end{matrix}$

The above can also be implemented using the following approximateconversion that avoids the division for the Cb and Cr components:Y′=0.212600*R′+0.715200*G′+0.072200*B′Cb=−0.114572*R′−0.385428*G′+0.500000*B′Cr=0.500000*R′−0.454153*G′−0.045847*B′  (4)

The ITU-R BT.2020 standard specifies the following conversion processfrom R′G′B′ to Y′CbCr (non-constant luminance representation):

$\begin{matrix}{{Y^{\prime} = {{0.2627*R^{\prime}} + {0.6780*G^{\prime}} + {0.0593*B^{\prime}}}}{{Cb} = \frac{B^{\prime} - Y^{\prime}}{1.8814}}{{Cr} = \frac{R^{\prime} - Y^{\prime}}{1.4746}}} & (5)\end{matrix}$

The above can also be implemented using the following approximateconversion that avoids the division for the Cb and Cr components:Y′=0.262700*R′+0.678000*G′+0.059300*B′Cb=−0.139630*R′−0.360370*G′+0.500000*B′Cr=0.500000*R′−0.459786*G′−0.040214*B′  (6)

It should be noted, that both color spaces remain normalized, therefor,for the input values normalized in the range 0 . . . 1 the resultingvalues will be mapped to the range 0 . . . 1. Generally, colortransforms implemented with floating point accuracy provide perfectreconstruction, thus this process is losels.

Video encoder 20 and video decoder 30 may implement quantization/fixedpoint conversion. The processing stages described above are typicallyimplemented in floating point accuracy representation, and thus can beconsidered as lossless. However, this type of accuracy can be consideredas redundant and expensive for most of consumer electronicsapplications. For such applications, input data in a target color spaceis typically converted to a target bit-depth fixed point accuracy.Certain studies show that 10-12 bits accuracy in combination with the PQTF is sufficient to provide HDR data of 16 f-stops with distortion belowthe Just-Noticeable Difference. Data represented with 10 bits accuracycan be further coded with most of the state-of-the-art video codingsolutions. This conversion process includes signal quantization and isan element of lossy coding and is a source of inaccuracy introduced toconverted data.

An example of such quantization applied to code words in a target colorspace, YCbCr in this example, is shown below. Input values YCbCrrepresented in floating point accuracy are converted into a signal offixed bit-depth BitDepthY for the Y value and BitDepthC for the chromavalues (Cb, Cr).D _(Y′)=Clip1_(Y)(Round((1<<(BitDepth_(Y)−8))*(219*Y′+16)))D _(Cb)=Clip1_(C)(Round((1<<(BitDepth_(C)−8))*(224*Cb+128)))D _(Cr)=Clip1_(C)(Round((1<<(BitDepth_(C)−8))*(224*Cr+128)))  (7)with

-   -   Round(x)=Sign(x)*Floor(Abs(x)+0.5)    -   Sign (x)=−1 if x<0, 0 if x=0, 1 if x>0    -   Floor(x) the largest integer less than or equal to x    -   Abs(x)=x if x>=0, −x if x<0    -   Clip1_(Y)(x)=Clip3(0, (1<<BitDepth_(Y))−1, x)    -   Clip1_(C)(x)=Clip3(0, (1<<BitDepth_(C))−1, x)    -   Clip3(x,y,z)=x if z<x, y if z>y, z otherwise

Video encoder 20 and video decoder 30 may implement DRA. DRA wasinitially proposed in Dynamic Range Adjustment SEI to enable HighDynamic Range video coding with Backward-Compatible Capability, D.Rusanovskyy, A. K. Ramasubramonian, D. Bugdayci, S. Lee, J. Sole, M.Karczewicz, VCEG document COM16-C 1027-E, September 2015 (hereinafterReference 1). The authors proposed to implement DRA as a piece-wiselinear function f(x) that is defined for a group of non-overlappeddynamic range partitions (ranges) {Ri} of input value x, were i is anindex of the range with range of 0 to N−1, inclusive, and where N is thetotal number of ranges {Ri} utilized for defining DRA function. Let'sassume that ranges of the DRA are defined by minimum and a maximum xvalue that belong to the range Ri, e.g. [x_(i), x_(i+1)−1] where x_(i)and x_(i+1) denote minimum value of the ranges R_(i) and R_(i+1)respectively. Applied to Y color component of the video (luma), DRAfunction Sy is defined through a scale S_(y,i) and offset O_(y,i) whichare applied to every x∈[x_(i), x_(i+1)−1], thus S_(y)={S_(y,i),O_(y,i)}.

With this, for any Ri, and every x∈[x_(i), x_(i+1)−1], the output valueX is calculated as follows:X=S _(y,i)*(x−O _(y,i))  (8)

For the inverse DRA mapping process for luma component Y conducted atthe decoder, DRA function Sy is defined by inverse of scale S_(y,i) andoffset O_(y,i) values which are applied to every X∈[X_(i), X_(i+1)−1].

With this, for any Ri, and every X∈[X_(i), X_(i+1)−1], reconstructedvalue x is calculated as follows:X=X/S _(y,i) +O _(y,i)  (9)

The forward DRA mapping process for chroma components Cb and Cr weredefined as following. Example is given with the term “u” denoting sampleof Cb color component that belongs to range Ri, u∈[u_(i), u_(i+1)−1],thus S_(u)={S_(u,i),O_(u,i)}.U=S _(u,i)*(u−O _(y,i))+Offset  (10)where Offset is equal to 2^((bitdepth-1)) denotes the bi-polar Cb, Crsignal offset.

The inverse DRA mapping process conducted at the decoder for chromacomponents Cb and Cr were defined as follows. Example is given with theU term denoting sample of remapped Cb color component which belongs tothe range Ri, U∈[U_(i),U_(i+i)−1]:u=(U−Offset)/S _(u,i) +O _(y,i)  (11)where Offset is equal to 2^((bitdepth-1)) denotes the bi-polar Cb, Crsignal offset.

Video encoder 20 and video decoder 30 may also implement luma-drivenchroma scaling (LCS). LCS was initially proposed in JCTVC-W0101 HDR CE2:Report on CE2.a-1 LCS, A. K. Ramasubramonian, J. Sole, D. Rusanovskyy,D. Bugdayci, M. Karczewicz (hereinafter Reference 2). In Reference 2,techniques to adjust chroma information, e.g., Cb and Cr, by exploitingbrightness information associated with the processed chroma sample wasproposed. Similarly to the DRA approach of Reference 1, it was proposedto apply to a chroma sample a scale factor S_(u) for Cb and S_(v,i) forCr. However, instead of defining DRA function as piece-wise linearfunction S_(u)={S_(u,i),O_(u,i)} for a set of ranges {R_(i)} accessibleby chroma value u or v as in Equations (3) and (4), the LCS approachproposed to utilize luma value Y to derive a scale factor for chromasample. With this, forward LCS mapping of the chroma sample u (or v) isconducted as:U=S _(u,i)(Y)*(u−Offset)+Offset  (12)The inverse LCS process conducted at the decoder side is defined asfollowing:u=(U−Offset)/S _(u,i)(Y)+Offset  (13)

In more details, for a given pixel located at (x, y), chroma samplesCb(x, y) or Cr(x, y) are scaled with a factor derived from an LCSfunction S_(Cb) (or S_(Cr)) determine by corresponding luma value Y′(x,y).

At the forward LCS for chroma samples, Cb (or Cr) values and theassociated luma value Y′ are taken as an input to the chroma scalefunction S_(Cb) (or S_(Cr)) and Cb or Cr are converted into Cb′ and Cr′as shown in Equation 9. At the decoder side, the inverse LCS is applied,reconstructed Cb′ or Cr′ are converted to Cb, or Cr as it shown inEquation (10).

$\begin{matrix}{{{{Cb}^{\prime}\left( {x,y} \right)} = {{S_{Cb}\left( {Y^{\prime}\left( {x,y} \right)} \right)}*{{Cb}\left( {x,y} \right)}}},{{{Cr}^{\prime}\left( {x,y} \right)} = {{S_{Cr}\left( {Y^{\prime}\left( {x,y} \right)} \right)}*{{Cr}\left( {x,y} \right)}}}} & (14) \\{{{Cb}\left( {x,y} \right)} = {{\frac{{Cb}^{\prime}\left( {x,y} \right)}{S_{Cb}\left( {Y^{\prime}\left( {x,y} \right)} \right)}{{Cr}\left( {x,y} \right)}} = \frac{{Cr}^{\prime}\left( {x,y} \right)}{S_{Cr}\left( {Y^{\prime}\left( {x,y} \right)} \right)}}} & (15)\end{matrix}$

FIG. 8 shows an example of LCS functions, with the LCS function in theexample, chroma components of pixels with smaller values of luma aremultiplied with smaller scaling factors.

The relationship between DRA sample scaling and quantization parameterswill now be discussed. To adjust compression ratio, video encoder 20utilizes block transform based video coding schemes, such as HEVC,utilizing scalar quantizers which are applied to transform coefficients.Video encoder 20 can control a scalar quantizer based on a quantizationparameter (QP), with the relationship between QP and scalar quantizerdefined as following:scaler=exp(QP/6)*log(2.0))  (16)

The inverse function defines the relationship between a scalar quantizerand QP in HEVC, as follows:QP=log 2(scaler)*6;  (17)

When implementing DRA, video encoder 20 and video decoder 30 effectivelyscale the pixel data and take into consideration transform properties,which can be mapped for a large class of signals to the scaler appliedin the transform domain. Thus, following relationship is defined:dQP=log 2(scaleDRA)*6;   (18)where dQP is an approximate QP offset introduced, by HEVC for example,by deploying DRA on the input data.

Some of the non-linearities (e.g. applying transfer function SMPTE 2084)and colour representations (e.g. ITU-R BT.2020 or BT.22100) utilized inmodern video coding systems may result in video data representationsthat feature significant variation of perceived distortion, orJust-Noticeable Difference (JND) threshold, over the dynamic range andcolor components of the signal representation. This can be perceived asunequal signal-to-noise ratios within the processed data range. Toaddress this problem and linearize coding (quantization) errordistributions in the dynamic range of the signal, the DRA method ofReference 1 was proposed.

Reference 1 proposed to apply DRA to achieve a codewords re-distributionin video data in ST 2084/BT.2020 container prior to applying hybrid,transform-based video coding scheme H.265/HEVC, as shown in FIG. 9.

Redistribution achieved by DRA targets linearization of perceiveddistortion (signal to noise ratio) within a dynamical range. Tocompensate this redistribution at the decoder side and convert data tothe original ST 2084/BT.2020 representation, an inverse DRA process isapplied to the data after video decoding.

Another example of such DRA scheme was proposed in Luma-driven chromascaling (LCS) design in HDR in JCTVC-W0101 HDR CE2: Report on CE2.a-1LCS, A. K. Ramasubramonian, J. Sole, D. Rusanovskyy, D. Bugdayci, M.Karczewicz (hereinafter Reference 2).

Reference 2 proposed techniques to adjust chroma information, e.g., Cband Cr, by exploiting brightness information associated with theprocessed chroma sample. Similarly, to the DRA approach in Reference 1,it was proposed to apply to a chroma sample a scale factor S_(u) for Cband S_(v,i) for Cr. However, instead of defining DRA function aspiece-wise linear function S_(u)={S_(u,i),O_(u,i)} for a set of ranges{R_(i)} accessible by chroma value u or v as in Equations (3) and (4),the LCS approach proposed to utilize luma value Y to derive a scalefactor for chroma sample.

The DRA techniques applied to video signal represented with a finitenumber of bits per sample, e.g., 10 bits, can be classified as pixellevel quantization. Being combined with video coding which deploysblock-based scalar quantization in the transform domain (e.g.H.265/HEVC) produces a video coding system with joined quantization ofthe signal in pixel and transform domains.

Designs of some video coding schemes may incorporate video coding tools,normative decision-making logic and parameters which are based onassumption/estimation of quantization error being introduced to thecoded signal. Among examples of such tools, H.265/HEVC deblocking filter(e.g., HEVC clause 8.7.2) and QP derivation process (e.g. HEVC clause8.6.1) at the decoder side can be listed.

Applying DRA at the pixel level may introduce quantization error thatcannot be estimated correctly, which can cause decision logic utilizedat the decoder to make non-optimal coding decisions. As an example,Table 8-10 of the HEVC specification defines the chroma QP shiftutilized during QP derivation at both encoder and decoder, which mayresult in a QP index derived by Eq. 8-259/8-260 that does not reflectthe pixel quantization/scaling applied to the samples of the currentchroma block.

This disclosure describes techniques for quantization parameters controlfor video coding with joined pixel/transform based quantization. Exampleof such systems is a combination of conventional hybrid video codingutilizing quantization in transform domain and DRA performingscaling/quantization in the pixel domain either in thepre/post-processing stage, or inside of the encoding loop of videocoding.

Video encoder 20 and video decoder 30 may perform DRA scalescompensation for decoder QP handling. DRA scales for three colorcomponents are adjusted to compensated QP handing in video codec.

Let's assume that parameters of DRA for 3 color components (e.g. Y, Cb,Cr) are defined through following variables:DRA_(y) ={S _(y,i) ,O _(y,i)}DRA_(Cb) ={S _(Cb,i) ,O _(Cb,i)}DRA_(Cr) ={S _(Cr,i) ,O _(Cr,i)}  (19a)

DRA parameters conducting pixel processing are signaled through codedbitstream or derived at the decoder side from syntax elements signaledin the bitstream. These DRA parameters are further adjusted by takinginto consideration information describing quantization of the transformcoefficients.DRA′_(y)=fun(DRA_(y) ,QPx)DRA′_(Cb)=fun(DRA_(Cb) ,QPx)DRA′_(Cr)=fun(DRA_(Cr) ,QPx)   (19b)

QPx represents a QP adjustment or manipulation conducted by videoencoder 20 for given block of pixels and signaled to video decoder 30 inthe bitstream or provided to video decoder 30 as side information, e.g.as pre-tabulated information. The output of this process is adjusted DRAparameters (DRA′_(y), DRA′_(Cb), DRA′_(Cr)) which are to be applied onthe decoded samples (Y_(dec), Cb_(dec), Cr_(dec)).Yo=fun(DRA′_(y) ,Y _(dec))Cb _(o)=fun(DRA′_(Cb) ,Cb _(dec))Cr _(o)=fun(DRA′_(Cr) ,Cr _(dec))  (20)

Video encoder 20 and video decoder 30 may adjust QP information toreflect impact of DRA applied to pixels. QP information utilized in thedecision making at the decoder side is altered to reflect impact of theDRA applied to pixels of the decoded picture.QP′_(y)=fun(QPx,DRA_(y))QP′_(Cb)=fun(QPx,DRA_(Cb))QP′_(Cr)=fun(QPx,DRA_(Cr))   (21)

QPx are QP parameters derived by the decoder without taking intoconsideration scaling implemented by DRA processing to current processedpixels.

The output of this process are adjusted QP (QP′_(y), QP′_(Cb), QP′_(Cr))which are utilized in decision making process at the decoder side. Insome examples, only a subset of the methods in the decoding algorithmwill use the adjusted QP in the decision making process.

Several non-limiting examples of implementation of the proposedtechniques of this disclosure will be describe below.

DRA scales compensation for the chroma QP shift table will now bedescribed. In some examples, derivation of the decoder's parameters maybe based on local QP information derived from syntax elements of thedecoded bitstream and further altered by a side information available atthe decoder side.

An example of such processing is in the HEVC specification at clause8.6.1:

-   -   The variables qP_(Cb) and qP_(Cr) are set equal to the value of        Qpc as specified in Table 8-9 based on the index qPi equal to        qPi_(Cb) and qPi_(Cr), respectively, and qPi_(Cb) and qPi_(Cr)        are derived as follows:        qPi _(Cb)=Clip3(−QpBdOffset_(C),57,Qp _(Y) +pps_        cb_qp_offset+slice_cb_qp_offset)   (8-257)        qPi _(Cr)=Clip3(−QpBdOffset_(C),57,Qp _(Y) +pps_        cr_qp_offset+slice_cr_qp_offset)   (8-258)    -   If ChromaArrayType is equal to 1, the variables qPCb and qPCr        are set equal to the value of QpC as specified in Table 8-10        based on the index qPi equal to qPiCb and qPiCr, respectively.    -   Otherwise, the variables qPCb and qPCr are set equal to Min(qPi,        51), based on the index qPi equal to qPiCb and qPiCr,        respectively.    -   The chroma quantization parameters for the Cb and Cr components,        Qp′_(Cb) and Qp′_(Cr), are derived as follows:        Qp′ _(Cb) =qP _(Cb) +QpBdOffset_(C)  (8-259)        Qp′ _(Cr) =qP _(Cr) +QpBdOffset_(C)  (8-260)

TABLE 8-9 Specification of Qp_(C) as a function of qPi qPi <30 30 31 3233 34 35 36 37 38 39 40 41 42 43 >43 Qp_(C) =qPi 29 30 31 32 33 33 34 3435 35 36 36 37 37 =qPi − 6

In such an example, DRA scale parameters for chroma components can bealtered to reflect QP shift introduced by such processing. Followingexample is given for Cb component, derivations for Cr components aresimilar.

Video decoder 30 may derive chroma quantization parameters for the Cbcomponent with Table 8-10. The QP information is estimated:estimateQP1=qPcb+QpBdPffsetCupdatedQP1=fun(Table8-10,estimateQP1)shiftQP1=updatedQP1−estimateQP1;  (22)

Variable updatedQP1 is further used in the decoding process and shiftQP1provides estimates for impact on the QP introduced by Table 8-10.

To harmonize pixel-level quantization conducted by DRA and QP handing inthe decoder, DRA scaling function is altered as following:estimateQP2=qPcb+QpBdPffsetC+scale2QP(DRACb)  (23)where scale2QP(DRACb) conducts conversion from Scale to QP, similarly isshown in Eq. 18updatedQP2=fun(Table8-10,estimateQP2)shiftQP2=updatedQP2−estimateQP2;  (24)

In some examples, in particularly in the case of cross-component DRAimplementation (e.g. LCS), Eq. (23) will includes QP offset termestimated from DRA scale of the Y component and additional QP offsetterm estimated from chromaticity scale (addnDRACbScale) used to produceDRA for Cb component. E.g.estimateQP2=qPcb+QpBdPffsetC+scale2QP(DRAY)+scale2QP(addnDRACbScale)

Variable UpdatedQP2 provides an estimates for QP in the case if DRAwould be conducted through transform domain scaling and shfitQP2provides estimates of the impact on the QP introduced by Table8-10.

In some circumstances, estimated shiftQP1 would not be equal toshiftQP2. To compensate this difference, scales of DRA can be alteredwith an multiplicator as following:shiftScale=Qp2Scale(shiftQP2−shiftQP1)DRACb′=shiftScale*DRACb  (25)Where function Qp2Scale converts QP variable to associated quantizerscale as shown in Eq. 16.

The outputs of this process are an adjusted DRA scale which is appliedto the decoded samples Cb_(dec).

In some examples, the output of scale to QP conversion functionscale2QP(DRACb) and the resulting estimateQP2 is a non-integer value. Inorder to address elements of the Table 8-10, input and output QP valuesto Table 8-10 may be interpolated between integer entries as following:qp1=fun(Table8-10,(Int)estimateQP2;qp2=fun(Table8-10,(Int)(estimateQP2+1.0));shiftQP2=qp1+(qp2−qp1)*(estimateQP2−(Int)estimateQP2);  (26)

In yet other examples, entries of Table 8-10 (or similar tabulatedinformation) can be defined through an analytical function, orexplicitly signalled in the bitstream.

In yet another example, the shiftScale can be computed to compensateimpact of Table8-10 shiftQP1 as follows:shiftScale=Qp2Scale(shiftQP1)

In some examples, a QP index for initializing equations 22 and 23 may besignaled through the bitstream in order to avoid parsing and processingdependencies. In some examples, video encoder 20 may estimate parametersfor the proposed techniques described herein and signal those parametersto video decoder 30 through a bitstream (metadata, SEI message, VUI, orSPS/PPS or slice header, etc.). Video decoder 30 then receives theparameters from the bitstream. In some examples, video encoder 20 mayderive the parameters of the proposed techniques. Video decoder 30 mayimplement a specified process from an input signal or from otheravailable parameters associated with the input signal and perform thesame derivation. In some examples, video encoder 20 may signal theparameters of proposed techniques explicitly to video decoder 30. In yetanother example, video encoder 20 and video decoder 30 may derive theparameters from other input signal parameters, e.g. parameters of theinput color gamut and target color container (color primaries).

FIG. 10 is a block diagram illustrating an example video encoder 20 thatmay implement the techniques described in this disclosure. Video encoder20 may perform intra- and inter-coding of video blocks within videoslices. Intra-coding relies on spatial prediction to reduce or removespatial redundancy in video within a given video frame or picture.Inter-coding relies on temporal prediction to reduce or remove temporalredundancy in video within adjacent frames or pictures of a videosequence. Intra-mode (I mode) may refer to any of several spatial basedcompression modes. Inter-modes, such as uni-directional prediction (Pmode) or bi-prediction (B mode), may refer to any of severaltemporal-based compression modes.

In the example of FIG. 10, video encoder 20 includes a video data memory33, partitioning unit 35, prediction processing unit 41, summer 50,transform processing unit 52, quantization unit 54, entropy encodingunit 56. Prediction processing unit 41 includes motion estimation unit(MEU) 42, motion compensation unit (MCU) 44, and intra predictionprocessing unit 46. For video block reconstruction, video encoder 20also includes inverse quantization unit 58, inverse transform processingunit 60, summer 62, filter unit 64, and decoded picture buffer (DPB) 66.

As shown in FIG. 10, video encoder 20 receives video data and stores thereceived video data in video data memory 33. Video data memory 33 maystore video data to be encoded by the components of video encoder 20.The video data stored in video data memory 33 may be obtained, forexample, from video source 18. DPB 66 may be a reference picture memorythat stores reference video data for use in encoding video data by videoencoder 20, e.g., in intra- or inter-coding modes. Video data memory 33and DPB 66 may be formed by any of a variety of memory devices, such asdynamic random access memory (DRAM), including synchronous DRAM (SDRAM),magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types ofmemory devices. Video data memory 33 and DPB 66 may be provided by thesame memory device or separate memory devices. In various examples,video data memory 33 may be on-chip with other components of videoencoder 20, or off-chip relative to those components.

Partitioning unit 35 retrieves the video data from video data memory 33and partitions the video data into video blocks. This partitioning mayalso include partitioning into slices, tiles, or other larger units, aswells as video block partitioning, e.g., according to a quadtreestructure of LCUs and CUs. Video encoder 20 generally illustrates thecomponents that encode video blocks within a video slice to be encoded.The slice may be divided into multiple video blocks (and possibly intosets of video blocks referred to as tiles). Prediction processing unit41 may select one of a plurality of possible coding modes, such as oneof a plurality of intra coding modes or one of a plurality of intercoding modes, for the current video block based on error results (e.g.,coding rate and the level of distortion). Prediction processing unit 41may provide the resulting intra- or inter-coded block to summer 50 togenerate residual block data and to summer 62 to reconstruct the encodedblock for use as a reference picture.

Intra prediction processing unit 46 within prediction processing unit 41may perform intra-predictive coding of the current video block relativeto one or more neighboring blocks in the same frame or slice as thecurrent block to be coded to provide spatial compression. Motionestimation unit 42 and motion compensation unit 44 within predictionprocessing unit 41 perform inter-predictive coding of the current videoblock relative to one or more predictive blocks in one or more referencepictures to provide temporal compression.

Motion estimation unit 42 may be configured to determine theinter-prediction mode for a video slice according to a predeterminedpattern for a video sequence. The predetermined pattern may designatevideo slices in the sequence as P slices or B slices. Motion estimationunit 42 and motion compensation unit 44 may be highly integrated, butare illustrated separately for conceptual purposes. Motion estimation,performed by motion estimation unit 42, is the process of generatingmotion vectors, which estimate motion for video blocks. A motion vector,for example, may indicate the displacement of a PU of a video blockwithin a current video frame or picture relative to a predictive blockwithin a reference picture.

A predictive block is a block that is found to closely match the PU ofthe video block to be coded in terms of pixel difference, which may bedetermined by sum of absolute difference (SAD), sum of square difference(SSD), or other difference metrics. In some examples, video encoder 20may calculate values for sub-integer pixel positions of referencepictures stored in DPB 66. For example, video encoder 20 may interpolatevalues of one-quarter pixel positions, one-eighth pixel positions, orother fractional pixel positions of the reference picture. Therefore,motion estimation unit 42 may perform a motion search relative to thefull pixel positions and fractional pixel positions and output a motionvector with fractional pixel precision.

Motion estimation unit 42 calculates a motion vector for a PU of a videoblock in an inter-coded slice by comparing the position of the PU to theposition of a predictive block of a reference picture. The referencepicture may be selected from a first reference picture list (List 0) ora second reference picture list (List 1), each of which identify one ormore reference pictures stored in DPB 66. Motion estimation unit 42sends the calculated motion vector to entropy encoding unit 56 andmotion compensation unit 44.

Motion compensation, performed by motion compensation unit 44, mayinvolve fetching or generating the predictive block based on the motionvector determined by motion estimation, possibly performinginterpolations to sub-pixel precision. Upon receiving the motion vectorfor the PU of the current video block, motion compensation unit 44 maylocate the predictive block to which the motion vector points in one ofthe reference picture lists. Video encoder 20 forms a residual videoblock by subtracting pixel values of the predictive block from the pixelvalues of the current video block being coded, forming pixel differencevalues. The pixel difference values form residual data for the block,and may include both luma and chroma difference components. Summer 50represents the component or components that perform this subtractionoperation. Motion compensation unit 44 may also generate syntax elementsassociated with the video blocks and the video slice for use by videodecoder 30 in decoding the video blocks of the video slice.

After prediction processing unit 41 generates the predictive block forthe current video block, either via intra prediction or interprediction, video encoder 20 forms a residual video block by subtractingthe predictive block from the current video block. The residual videodata in the residual block may be included in one or more TUs andapplied to transform processing unit 52. Transform processing unit 52transforms the residual video data into residual transform coefficientsusing a transform, such as a discrete cosine transform (DCT) or aconceptually similar transform. Transform processing unit 52 may convertthe residual video data from a pixel domain to a transform domain, suchas a frequency domain.

Transform processing unit 52 may send the resulting transformcoefficients to quantization unit 54. Quantization unit 54 quantizes thetransform coefficients to further reduce bit rate. The quantizationprocess may reduce the bit depth associated with some or all of thecoefficients. The degree of quantization may be modified by adjusting aquantization parameter. In some examples, quantization unit 54 may thenperform a scan of the matrix including the quantized transformcoefficients. In another example, entropy encoding unit 56 may performthe scan.

Following quantization, entropy encoding unit 56 entropy encodes thequantized transform coefficients. For example, entropy encoding unit 56may perform context adaptive variable length coding (CAVLC), contextadaptive binary arithmetic coding (CABAC), syntax-based context-adaptivebinary arithmetic coding (SBAC), probability interval partitioningentropy (PIPE) coding or another entropy encoding methodology ortechnique. Following the entropy encoding by entropy encoding unit 56,the encoded bitstream may be transmitted to video decoder 30 or archivedfor later transmission or retrieval by video decoder 30. Entropyencoding unit 56 may also entropy encode the motion vectors and theother syntax elements for the current video slice being coded.

Inverse quantization unit 58 and inverse transform processing unit 60apply inverse quantization and inverse transformation, respectively, toreconstruct the residual block in the pixel domain for later use as areference block of a reference picture. Motion compensation unit 44 maycalculate a reference block by adding the residual block to a predictiveblock of one of the reference pictures within one of the referencepicture lists. Motion compensation unit 44 may also apply one or moreinterpolation filters to the reconstructed residual block to calculatesub-integer pixel values for use in motion estimation. Summer 62 addsthe reconstructed residual block to the motion compensated predictionblock produced by motion compensation unit 44 to produce a reconstructedblock.

Filter unit 64 filters the reconstructed block (e.g. the output ofsummer 62) and stores the filtered reconstructed block in DPB 66 foruses as a reference block. The reference block may be used by motionestimation unit 42 and motion compensation unit 44 as a reference blockto inter-predict a block in a subsequent video frame or picture. Filterunit 64 is intended to represent one or more of a deblocking filter, asample adaptive offset filter, and adaptive loop filter, or other typesof filters. A deblock filter may, for example, apply deblockingfiltering to filter block boundaries to remove blockiness artifacts fromreconstructed video. A sample adaptive offset filter may apply offsetsto reconstructed pixel values in order to improve overall codingquality. Additional loop filters (in loop or post loop) may also beused.

Various techniques described in this disclosure may be performed byvideo encoder 20 and/or pre-processing unit 19, either separately or incombination with one another. For example, video encoder 20 an/orpre-processing unit 19 may be configured to process HDR/WCG video data.Video encoder 20 and/or pre-processing unit 19 may be configured todetermine a quantization parameter for quantized transform coefficientsof a block of the HDR/WCG video data; inverse quantize the quantizedtransform coefficients based on the determined quantization parameter todetermine dequantized transform coefficients; based on the dequantizedtransform coefficients, determine a block of residual values for theblock of the HDR/WCG video data; based on the block of residual values,determine a reconstructed block for the block of the HDR/WCG video data;determine one or more DRA parameters for the block of the HDR/WCG videodata; adjust the one or more DRA parameters based on the determinedquantization parameter to determine one or more adjusted DRA parameters;and perform DRA on the reconstructed block of the HDR/WCG video datausing the one or more adjusted DRA parameters.

Video encoder 20 an/or pre-processing unit 19 may additionally oralternatively be configured to determine a quantization parameter forquantized transform coefficients of a block of the HDR/WCG video data;quantize the quantized transform coefficients based on the determinedquantization parameter to determine quantized transform coefficients;determine one or more DRA parameters for the block of the HDR/WCG videodata based on the determined quantization parameter; and adjust the oneor more DRA parameters based on the determined quantization parameter todetermine one or more adjusted DRA parameters.

FIG. 11 is a block diagram illustrating an example video decoder 30 thatmay implement the techniques described in this disclosure. Video decoder30 of FIG. 11 may, for example, be configured to receive the signalingdescribed above with respect to video encoder 20 of FIG. 10. In theexample of FIG. 11, video decoder 30 includes video data memory 78,entropy decoding unit 80, prediction processing unit 81, inversequantization unit 86, inverse transform processing unit 88, summer 90,filter unit 92, and DPB 94. Prediction processing unit 81 includesmotion compensation unit 82 and intra prediction unit 84. Video decoder30 may, in some examples, perform a decoding pass generally reciprocalto the encoding pass described with respect to video encoder 20 fromFIG. 10.

During the decoding process, video decoder 30 receives an encoded videobitstream that represents video blocks of an encoded video slice andassociated syntax elements from video encoder 20. Video decoder 30stores the received encoded video bitstream in video data memory 78.Video data memory 78 may store video data, such as an encoded videobitstream, to be decoded by the components of video decoder 30. Thevideo data stored in video data memory 78 may be obtained, for example,via link 16, from storage device 26, or from a local video source, suchas a camera, or by accessing physical data storage media. Video datamemory 78 may form a coded picture buffer (CPB) that stores encodedvideo data from an encoded video bitstream. DPB 94 may be a referencepicture memory that stores reference video data for use in decodingvideo data by video decoder 30, e.g., in intra- or inter-coding modes.Video data memory 78 and DPB 94 may be formed by any of a variety ofmemory devices, such as DRAM, SDRAM, MRAM, RRAM, or other types ofmemory devices. Video data memory 78 and DPB 94 may be provided by thesame memory device or separate memory devices. In various examples,video data memory 78 may be on-chip with other components of videodecoder 30, or off-chip relative to those components.

Entropy decoding unit 80 of video decoder 30 entropy decodes the videodata stored in video data memory 78 to generate quantized coefficients,motion vectors, and other syntax elements. Entropy decoding unit 80forwards the motion vectors and other syntax elements to predictionprocessing unit 81. Video decoder 30 may receive the syntax elements atthe video slice level and/or the video block level.

When the video slice is coded as an intra-coded (I) slice, intraprediction unit 84 of prediction processing unit 81 may generateprediction data for a video block of the current video slice based on asignaled intra prediction mode and data from previously decoded blocksof the current frame or picture. When the video frame is coded as aninter-coded slice (e.g., B slice or P slice), motion compensation unit82 of prediction processing unit 81 produces predictive blocks for avideo block of the current video slice based on the motion vectors andother syntax elements received from entropy decoding unit 80. Thepredictive blocks may be produced from one of the reference pictureswithin one of the reference picture lists. Video decoder 30 mayconstruct the reference frame lists, List 0 and List 1, using defaultconstruction techniques based on reference pictures stored in DPB 94.

Motion compensation unit 82 determines prediction information for avideo block of the current video slice by parsing the motion vectors andother syntax elements and uses the prediction information to produce thepredictive blocks for the current video block being decoded. Forexample, motion compensation unit 82 uses some of the received syntaxelements to determine a prediction mode (e.g., intra- orinter-prediction) used to code the video blocks of the video slice, aninter-prediction slice type (e.g., B slice or P slice), constructioninformation for one or more of the reference picture lists for theslice, motion vectors for each inter-encoded video block of the slice,inter-prediction status for each inter-coded video block of the slice,and other information to decode the video blocks in the current videoslice.

Motion compensation unit 82 may also perform interpolation based oninterpolation filters. Motion compensation unit 82 may use interpolationfilters as used by video encoder 20 during encoding of the video blocksto calculate interpolated values for sub-integer pixels of referenceblocks. In this case, motion compensation unit 82 may determine theinterpolation filters used by video encoder 20 from the received syntaxelements and use the interpolation filters to produce predictive blocks.

Inverse quantization unit 86 inverse quantizes, i.e., de-quantizes, thequantized transform coefficients provided in the bitstream and decodedby entropy decoding unit 80. The inverse quantization process mayinclude use of a quantization parameter calculated by video encoder 20for each video block in the video slice to determine a degree ofquantization and, likewise, a degree of inverse quantization that shouldbe applied. Inverse transform processing unit 88 applies an inversetransform, e.g., an inverse DCT, an inverse integer transform, or aconceptually similar inverse transform process, to the transformcoefficients in order to produce residual blocks in the pixel domain.

After prediction processing unit generates the predictive block for thecurrent video block using, for example, intra or inter prediction, videodecoder 30 forms a reconstructed video block by summing the residualblocks from inverse transform processing unit 88 with the correspondingpredictive blocks generated by motion compensation unit 82. Summer 90represents the component or components that perform this summationoperation.

Filter unit 92 filters the reconstructed video block using, for example,one or more of deblock filtering, SAO filtering, adaptive loopfiltering, or other types of filters. Other loop filters (either in thecoding loop or after the coding loop) may also be used to smooth pixeltransitions or otherwise improve the video quality. The decoded videoblocks in a given frame or picture are then stored in DPB 94, whichstores reference pictures used for subsequent motion compensation. DPB94 may be part of or separate from additional memory that stores decodedvideo for later presentation on a display device, such as display device32 of FIG. 1.

Various techniques described in this disclosure may be performed byvideo decoder 30 and/or post-processing unit 31, either separately or incombination with one another. For example, video decoder 30 an/orpost-processing unit 31 may be configured to process HDR/WCG video data.Video decoder 30 and/or post-processing unit 31 may be configured todetermine a quantization parameter for quantized transform coefficientsof a block of the HDR/WCG video data; inverse quantize the quantizedtransform coefficients based on the determined quantization parameter todetermine dequantized transform coefficients; based on the dequantizedtransform coefficients, determine a block of residual values for theblock of the HDR/WCG video data; based on the block of residual values,determine a reconstructed block for the block of the HDR/WCG video data;determine one or more DRA parameters for the block of the HDR/WCG videodata; adjust the one or more DRA parameters based on the determinedquantization parameter to determine one or more adjusted DRA parameters;and perform DRA on the reconstructed block of the HDR/WCG video datausing the one or more adjusted DRA parameters.

FIG. 12 is a flowchart illustrating an example operation of a videodecoder for decoding video data in accordance with a technique of thisdisclosure. The video decoder described with respect to FIG. 12 may, forexample, be a video decoder, such as video decoder 30, for outputtingdisplayable decoded video or may be a video decoder implemented in avideo encoder, such as the decoding loop of video encoder 20, whichincludes prediction processing unit 41, inverse quantization unit 58,inverse transform processing unit 60, filter unit 64, and DPB 66. Someof the techniques of FIG. 12 may be performed by entities separate fromthe video decoder, such as pre-processing unit 19 or post-processingunit 31, but for simplicity, all the techniques of FIG. 12 will bedescribed as being performed by the video decoder.

The video decoder determines a quantization parameter for quantizedtransform coefficients of a block of the HDR/WCG video data (200). Thevideo decoder inverse quantizes the quantized transform coefficientsbased on the determined quantization parameter to determine dequantizedtransform coefficients (210). Based on the dequantized transformcoefficients, the video decoder determines a block of residual valuesfor the block of the HDR/WCG video data (220). Based on the block ofresidual values, the video decoder determines a reconstructed block forthe block of the HDR/WCG video data (230). The video decoder determinesone or more DRA parameters for the block of the HDR/WCG video data(240). To determine the one or more DRA parameters for the block of theHDR/WCG video data, the video decoder may receive indications of the oneor more DRA parameters as syntax elements in the HDR/WCG video data ormay otherwise derive the one or DRA parameters.

The video decoder adjusts the one or more DRA parameters based on thedetermined quantization parameter to determine one or more adjusted DRAparameters (250). The one or more DRA parameters for the block of theHDR/WCG video data may include a scaling parameter for a luma componentof the block of the HDR/WCG video data and an offset parameter for theluma component of the block of the HDR/WCG video data, and the one ormore adjusted DRA parameters for the block of the HDR/WCG video data mayinclude an adjusted scaling parameter for the luma component of theblock of the HDR/WCG video data and an adjusted offset parameter for theluma component of the block of the HDR/WCG video data. The one or moreDRA parameters for the block of the HDR/WCG video data may include ascaling parameter for a chroma component of the block of the HDR/WCGvideo data and an offset parameter for the chroma component of the blockof the HDR/WCG video data, and the one or more adjusted DRA parametersfor the block of the HDR/WCG video data may include an adjusted scalingparameter for the chroma component of the block of the HDR/WCG videodata and an adjusted offset parameter for the chroma component of theblock of the HDR/WCG video data. The one or more adjusted DRA parametersmay include an adjusted DRA parameter for a first chroma component ofthe block of the HDR/WCG video data and an adjusted DRA parameter for asecond chroma component of the block of the HDR/WCG video data. The oneor more adjusted DRA parameters may include an adjusted DRA parameterfor a luma component of the block of the HDR/WCG video data, an adjustedDRA parameter for a first chroma component of the block of the HDR/WCGvideo data, and an adjusted DRA parameter for a second chroma componentof the block of the HDR/WCG video data.

The video decoder performs DRA on the reconstructed block of the HDR/WCGvideo data using the one or more adjusted DRA parameters (260). Thevideo decoder may also output the adjusted video data resulting fromperforming DRA. The video decoder may, for example, output the adjustedvideo data for display or may output the adjusted video data by storingthe adjusted video data. The video decoder may store the adjusted videodata for future display or may store the adjusted video data forencoding or decoding future blocks of video data.

In one or more examples, the functions described may be implemented inhardware, software, firmware, or any combination thereof. If implementedin software, the functions may be stored on or transmitted over, as oneor more instructions or code, a computer-readable medium and executed bya hardware-based processing unit. Computer-readable media may includecomputer-readable storage media, which corresponds to a tangible mediumsuch as data storage media, or communication media including any mediumthat facilitates transfer of a computer program from one place toanother, e.g., according to a communication protocol. In this manner,computer-readable media generally may correspond to (1) tangiblecomputer-readable storage media which is non-transitory or (2) acommunication medium such as a signal or carrier wave. Data storagemedia may be any available media that can be accessed by one or morecomputers or one or more processors to retrieve instructions, codeand/or data structures for implementation of the techniques described inthis disclosure. A computer program product may include acomputer-readable medium.

By way of example, and not limitation, such computer-readable storagemedia can comprise RAM, ROM, EEPROM, CD-ROM or other optical diskstorage, magnetic disk storage, or other magnetic storage devices, flashmemory, or any other medium that can be used to store desired programcode in the form of instructions or data structures and that can beaccessed by a computer. Also, any connection is properly termed acomputer-readable medium. For example, if instructions are transmittedfrom a website, server, or other remote source using a coaxial cable,fiber optic cable, twisted pair, digital subscriber line (DSL), orwireless technologies such as infrared, radio, and microwave, then thecoaxial cable, fiber optic cable, twisted pair, DSL, or wirelesstechnologies such as infrared, radio, and microwave are included in thedefinition of medium. It should be understood, however, thatcomputer-readable storage media and data storage media do not includeconnections, carrier waves, signals, or other transient media, but areinstead directed to non-transient, tangible storage media. Disk anddisc, as used herein, includes compact disc (CD), laser disc, opticaldisc, digital versatile disc (DVD), floppy disk and Blu-ray disc, wheredisks usually reproduce data magnetically, while discs reproduce dataoptically with lasers. Combinations of the above should also be includedwithin the scope of computer-readable media.

Instructions may be executed by one or more processors, such as one ormore digital signal processors (DSPs), general purpose microprocessors,application specific integrated circuits (ASICs), field programmablelogic arrays (FPGAs), or other equivalent integrated or discrete logiccircuitry. Accordingly, the term “processor,” as used herein may referto any of the foregoing structure or any other structure suitable forimplementation of the techniques described herein. In addition, in someaspects, the functionality described herein may be provided withindedicated hardware and/or software modules configured for encoding anddecoding, or incorporated in a combined codec. Also, the techniquescould be fully implemented in one or more circuits or logic elements.

The techniques of this disclosure may be implemented in a wide varietyof devices or apparatuses, including a wireless handset, an integratedcircuit (IC) or a set of ICs (e.g., a chip set). Various components,modules, or units are described in this disclosure to emphasizefunctional aspects of devices configured to perform the disclosedtechniques, but do not necessarily require realization by differenthardware units. Rather, as described above, various units may becombined in a codec hardware unit or provided by a collection ofinteroperative hardware units, including one or more processors asdescribed above, in conjunction with suitable software and/or firmware.

Various examples have been described. These and other examples arewithin the scope of the following claims.

What is claimed is:
 1. A method of processing high dynamic range and/or wide color gamut (HDR/WCG) video data, the method comprising: determining a quantization parameter for quantized transform coefficients of a block of the HDR/WCG video data; inverse quantizing the quantized transform coefficients based on the determined quantization parameter to determine dequantized transform coefficients; based on the dequantized transform coefficients, determining a block of residual values for the block of the HDR/WCG video data; based on the block of residual values, determining a reconstructed block for the block of the HDR/WCG video data; determining one or more dynamic range adjustment (DRA) parameters for the block of the HDR/WCG video data, wherein the one or more DRA parameters for the block of the HDR/WCG video data comprise a scaling parameter for a luma component of the block of the HDR/WCG video data and an offset parameter for the luma component of the block of the HDR/WCG video data; adjusting the one or more DRA parameters based on the determined quantization parameter to determine one or more adjusted DRA parameters, wherein the one or more adjusted DRA parameters for the block of the HDR/WCG video data comprise an adjusted scaling parameter for the luma component of the block of the HDR/WCG video data and an adjusted offset parameter for the luma component of the block of the HDR/WCG video data; and performing DRA on the reconstructed block of the HDR/WCG video data using the one or more adjusted DRA parameters.
 2. The method of claim 1, wherein the one or more DRA parameters for the block of the HDR/WCG video data further comprise a scaling parameter for a chroma component of the block of the HDR/WCG video data and an offset parameter for the chroma component of the block of the HDR/WCG video data, and wherein the one or more adjusted DRA parameters for the block of the HDR/WCG video data further comprise an adjusted scaling parameter for the chroma component of the block of the HDR/WCG video data and an adjusted offset parameter for the chroma component of the block of the HDR/WCG video data.
 3. The method of claim 1, wherein the one or more adjusted DRA parameters further comprise an adjusted DRA parameter for a first chroma component of the block of the HDR/WCG video data and an adjusted DRA parameter for a second chroma component of the block of the HDR/WCG video data.
 4. The method of claim 1, wherein the one or more adjusted DRA parameters further comprise an adjusted DRA parameter for a first chroma component of the block of the HDR/WCG video data and an adjusted DRA parameter for a second chroma component of the block of the HDR/WCG video data.
 5. The method of claim 1, wherein determining the one or more DRA parameters for the block of the HDR/WCG video data comprises receiving indications of the one or more DRA parameters as syntax elements in the HDR/WCG video data.
 6. The method of claim 1, wherein the reconstructed block of the HDR/WCG video data comprises a filtered version of the reconstructed block.
 7. The method of claim 1, wherein determining the one or more DRA parameters for the block of the HDR/WCG video data comprises deriving at least one of the one or more DRA parameters for the block of the HDR/WCG video data based on a dependency between a quantization parameter for the luma component of the block of the HDR/WCG video data and a quantization parameter for a chroma component of the block of the HDR/WCG video data.
 8. The method of claim 7, wherein deriving the at least one of the one or more DRA parameters for the block of the HDR/WCG video data based on the dependency between the quantization parameter for the luma component of the block of the HDR/WCG video data and the quantization parameter for the chroma component of the block of the HDR/WCG video data comprises deriving the at least one of the one or more DRA parameters by performing QP to DRA scale conversion.
 9. The method of claim 7, wherein deriving the at least one of the one or more DRA parameters for the block of the HDR/WCG video data based on the dependency between the quantization parameter for the luma component of the block of the HDR/WCG video data and the quantization parameter for the chroma component of the block of the HDR/WCG video data comprises deriving the at least one of the one or more DRA parameters by performing DRA scale to QP conversion.
 10. The method of claim 7, wherein the dependency between the quantization parameter for the luma component and the quantization parameter for the chroma component is defined by a codec.
 11. The method of claim 7, the method further comprising: receiving syntax elements in the HDR/WCG video data, wherein values for the syntax elements define the dependency between the quantization parameter for the luma component of the block of the HDR/WCG video data and the quantization parameter for the chroma component of the block of the HDR/WCG video data.
 12. The method of claim 1, wherein the method of decoding is performed as part of an encoding process.
 13. A device for processing high dynamic range and/or wide color gamut (HDR/WCG) video data, the device comprising: a memory configured to store video data; and one or more processors coupled to the memory and configured to: determine a quantization parameter for quantized transform coefficients of a block of the HDR/WCG video data; inverse quantize the quantized transform coefficients based on the determined quantization parameter to determine dequantized transform coefficients; based on the dequantized transform coefficients, determine a block of residual values for the block of the HDR/WCG video data; based on the block of residual values, determine a reconstructed block for the block of the HDR/WCG video data; determine one or more dynamic range adjustment (DRA) parameters for the block of the HDR/WCG video data, wherein the one or more DRA parameters for the block of the HDR/WCG video data comprise a scaling parameter for a luma component of the block of the HDR/WCG video data and an offset parameter for the luma component of the block of the HDR/WCG video data; adjust the one or more DRA parameters based on the determined quantization parameter to determine one or more adjusted DRA parameters, wherein the one or more adjusted DRA parameters for the block of the HDR/WCG video data comprise an adjusted scaling parameter for the luma component of the block of the HDR/WCG video data and an adjusted offset parameter for the luma component of the block of the HDR/WCG video data; and perform DRA on the reconstructed block of the HDR/WCG video data using the one or more adjusted DRA parameters.
 14. The device of claim 13, wherein the one or more DRA parameters for the block of the HDR/WCG video data further comprise a scaling parameter for a chroma component of the block of the HDR/WCG video data and an offset parameter for the chroma component of the block of the HDR/WCG video data, and wherein the one or more adjusted DRA parameters for the block of the HDR/WCG video data further comprise an adjusted scaling parameter for the chroma component of the block of the HDR/WCG video data and an adjusted offset parameter for the chroma component of the block of the HDR/WCG video data.
 15. The device of claim 13, wherein the one or more adjusted DRA parameters further comprise an adjusted DRA parameter for a first chroma component of the block of the HDR/WCG video data and an adjusted DRA parameter for a second chroma component of the block of the HDR/WCG video data.
 16. The device of claim 13, wherein the one or more adjusted DRA parameters further comprise an adjusted DRA parameter for a first chroma component of the block of the HDR/WCG video data and an adjusted DRA parameter for a second chroma component of the block of the HDR/WCG video data.
 17. The device of claim 13, wherein to determine the one or more DRA parameters for the block of the HDR/WCG video data, the one or more processors are configured to receive indications of the one or more DRA parameters as syntax elements in the HDR/WCG video data.
 18. The device of claim 13, wherein the reconstructed block of the HDR/WCG video data comprises a filtered version of the reconstructed block.
 19. The device of claim 13, wherein to determine the one or more DRA parameters for the block of the HDR/WCG video data, the one or more processors are configured to derive at least one of the one or more DRA parameters for the block of the HDR/WCG video data based on a dependency between a quantization parameter for the luma component of the block of the HDR/WCG video data and a quantization parameter for a chroma component of the block of the HDR/WCG video data.
 20. The device of claim 19, wherein to derive the at least one of the one or more DRA parameters for the block of the HDR/WCG video data based on the dependency between the quantization parameter for the luma component of the block of the HDR/WCG video data and the quantization parameter for the chroma component of the block of the HDR/WCG video data, the one or more processors are configured to derive the at least one of the one or more DRA parameters by performing QP to DRA scale conversion.
 21. The device of claim 19, wherein to derive the at least one of the one or more DRA parameters for the block of the HDR/WCG video data based on the dependency between the quantization parameter for the luma component of the block of the HDR/WCG video data and the quantization parameter for the chroma component of the block of the HDR/WCG video data, the one or more processors are configured to derive the at least one of the one or more DRA parameters by performing DRA scale to QP conversion.
 22. The device of claim 19, wherein the dependency between the quantization parameter for the luma component and the quantization parameter for the chroma component is defined by a codec.
 23. The device of claim 19, wherein the one or more processors are further configured to: receive syntax elements in the HDR/WCG video data, wherein values for the syntax elements define the dependency between the quantization parameter for the luma component of the block of the HDR/WCG video data and the quantization parameter for the chroma component of the block of the HDR/WCG video data.
 24. The device of claim 13, wherein the device comprises a wireless communication device, further comprising a receiver configured to receive encoded video data.
 25. The device of claim 24, wherein the wireless communication device comprises a telephone handset and wherein the receiver is configured to demodulate, according to a wireless communication standard, a signal comprising the encoded video data.
 26. The device of claim 13, wherein the device comprises a wireless communication device, further comprising a transmitter configured to transmit encoded video data.
 27. The device of claim 26, wherein the wireless communication device comprises a telephone handset and wherein the transmitter is configured to modulate, according to a wireless communication standard, a signal comprising the encoded video data.
 28. A non-transitory computer readable medium storing instructions that when executed by one or more processors cause the one or more processors to: determine a quantization parameter for quantized transform coefficients of a block of high dynamic range and/or wide color gamut (HDR/WCG) video data; inverse quantize the quantized transform coefficients based on the determined quantization parameter to determine dequantized transform coefficients; based on the dequantized transform coefficients, determine a block of residual values for the block of the HDR/WCG video data; based on the block of residual values, determine a reconstructed block for the block of the HDR/WCG video data; determine one or more dynamic range adjustment (DRA) parameters for the block of the HDR/WCG video data, wherein the one or more DRA parameters for the block of the HDR/WCG video data comprise a scaling parameter for a luma component of the block of the HDR/WCG video data and an offset parameter for the luma component of the block of the HDR/WCG video data; adjust the one or more DRA parameters based on the determined quantization parameter to determine one or more adjusted DRA parameters, wherein the one or more adjusted DRA parameters for the block of the HDR/WCG video data comprise an adjusted scaling parameter for the luma component of the block of the HDR/WCG video data and an adjusted offset parameter for the luma component of the block of the HDR/WCG video data; and perform DRA on the reconstructed block of the HDR/WCG video data using the one or more adjusted DRA parameters.
 29. An apparatus for processing high dynamic range and/or wide color gamut (HDR/WCG) video data, the device comprising: means for determining a quantization parameter for quantized transform coefficients of a block of the HDR/WCG video data; means for inverse quantizing the quantized transform coefficients based on the determined quantization parameter to determine dequantized transform coefficients; means for determining a block of residual values for the block of the HDR/WCG video data based on the dequantized transform coefficients; means for determining a reconstructed block for the block of the HDR/WCG video data based on the block of residual values; means for determining one or more dynamic range adjustment (DRA) parameters for the block of the HDR/WCG video data, wherein the one or more DRA parameters for the block of the HDR/WCG video data comprise a scaling parameter for a luma component of the block of the HDR/WCG video data and an offset parameter for the luma component of the block of the HDR/WCG video data; means for adjusting the one or more DRA parameters based on the determined quantization parameter to determine one or more adjusted DRA parameters, wherein the one or more adjusted DRA parameters for the block of the HDR/WCG video data comprise an adjusted scaling parameter for the luma component of the block of the HDR/WCG video data and an adjusted offset parameter for the luma component of the block of the HDR/WCG video data; and means for performing DRA on the reconstructed block of the HDR/WCG video data using the one or more adjusted DRA parameters. 